export const antiShake = (fn: Function, num: number) => {
    let timer: string | number | NodeJS.Timeout | undefined;
    return function () {
        let args = arguments;
        if (timer) {
            clearTimeout(timer);
        }
        timer = setTimeout(() => {
            fn.apply(this, args);   // this 指向vue
        }, num);
    }
}